home *** CD-ROM | disk | FTP | other *** search
-
-
-
- XXXXGGGGeeeettttDDDDeeeevvvviiiicccceeeeMMMMoooottttiiiioooonnnnEEEEvvvveeeennnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXGGGGeeeettttDDDDeeeevvvviiiicccceeeeMMMMoooottttiiiioooonnnnEEEEvvvveeeennnnttttssss((((3333XXXX11111111))))
-
-
-
- NNNNAAAAMMMMEEEE
- XGetDeviceMotionEvents, XDeviceTimeCoord - get device motion
- history
-
- SSSSYYYYNNNNTTTTAAAAXXXX
- XDeviceTimeCoord *XGetDeviceMotionEvents(_d_i_s_p_l_a_y, _d_e_v_i_c_e,
- _s_t_a_r_t, _s_t_o_p,
- _n_e_v_e_n_t_s__r_e_t_u_r_n, _m_o_d_e__r_e_t_u_r_n, _a_x_i_s__c_o_u_n_t__r_e_t_u_r_n)
- Display *_d_i_s_p_l_a_y;
- XDevice *_d_e_v_i_c_e;
- Time _s_t_a_r_t, _s_t_o_p;
- int *_n_e_v_e_n_t_s__r_e_t_u_r_n;
- int *_m_o_d_e__r_e_t_u_r_n;
- int *_a_x_i_s__c_o_u_n_t__r_e_t_u_r_n;
-
- AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
- _d_i_s_p_l_a_y Specifies the connection to the X server.
-
- _d_e_v_i_c_e Specifies the device whose motion history is to
- be queried.
-
- _s_t_a_r_t
- _s_t_o_p Specify the time interval in which the events
- are returned from the motion history buffer.
- You can pass a timestamp or _C_u_r_r_e_n_t_T_i_m_e.
-
- _n_e_v_e_n_t_s__r_e_t_u_r_n
- Returns the number of events from the motion
- history buffer.
-
- _m_o_d_e__r_e_t_u_r_n Returns the mode of the device (_A_b_s_o_l_u_t_e or
- _R_e_l_a_t_i_v_e).
-
- _a_x_i_s__c_o_u_n_t__r_e_t_u_r_n
- Returns the count of axes being reported.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The server may retain the recent history of the device
- motion and do so to a finer granularity than is reported by
- _D_e_v_i_c_e_M_o_t_i_o_n_N_o_t_i_f_y events. The _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s
- request makes this history available.
-
- The _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s request returns all events in the
- motion history buffer that fall between the specified start
- and stop times, inclusive. If the start time is later than
- the stop time or if the start time is in the future, no
- events are returned. If the stop time is in the future, it
- is equivalent to specifying _C_u_r_r_e_n_t_T_i_m_e.
-
- The _m_o_d_e indicates whether the device is reporting absolute
- positional data (mode=_A_b_s_o_l_u_t_e) or relative motion data
- (mode=_R_e_l_a_t_i_v_e). Some devices allow their mode to be
-
-
-
- Page 1 (printed 10/3/02)
-
-
-
-
-
-
- XXXXGGGGeeeettttDDDDeeeevvvviiiicccceeeeMMMMoooottttiiiioooonnnnEEEEvvvveeeennnnttttssss((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXGGGGeeeettttDDDDeeeevvvviiiicccceeeeMMMMoooottttiiiioooonnnnEEEEvvvveeeennnnttttssss((((3333XXXX11111111))))
-
-
-
- changed via the _X_S_e_t_D_e_v_i_c_e_M_o_d_e request. These constants are
- defined in the file XI.h. The _a_x_i_s__c_o_u_n_t returns the number
- of axes or valuators being reported by the device.
-
- _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s can generate a _B_a_d_D_e_v_i_c_e, or _B_a_d_M_a_t_c_h
- error.
-
- SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
- The _X_D_e_v_i_c_e_T_i_m_e_C_o_o_r_d structure contains:
-
- typedef struct {
- Time time;
- int *data;
- } XDeviceTimeCoord;
-
- The time member is set to the time, in milliseconds. The
- data member is a pointer to an array of integers. These
- integers are set to the values of each valuator or axis
- reported by the device. There is one element in the array
- per axis of motion reported by the device. The value of the
- array elements depends on the mode of the device. If the
- mode is _A_b_s_o_l_u_t_e, the values are the raw values generated by
- the device. These may be scaled by client programs using
- the maximum values that the device can generate. The
- maximum value for each axis of the device is reported in the
- max_val field of the _X_A_x_i_s_I_n_f_o returned by the
- _X_L_i_s_t_I_n_p_u_t_D_e_v_i_c_e_s request. If the mode is _R_e_l_a_t_i_v_e, the
- data values are the relative values generated by the device.
-
- You should use _X_F_r_e_e_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s to free the data
- returned by this request.
-
- Errors returned by this request: _B_a_d_D_e_v_i_c_e, _B_a_d_M_a_t_c_h.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- _B_a_d_D_e_v_i_c_e An invalid device was specified. The specified
- device does not exist or has not been opened by
- this client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e. This error
- may also occur if the specified device is the X
- keyboard or X pointer device.
-
- _B_a_d_M_a_t_c_h This error may occur if an
- _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s request is made
- specifying a device that has no valuators and
- reports no axes of motion.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- _P_r_o_g_r_a_m_m_i_n_g _w_i_t_h _X_l_i_b
-
-
-
-
-
-
-
- Page 2 (printed 10/3/02)
-
-
-
-